import { _decorator, Component, Node, director, game } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('GameStartMenu')
export class GameStartMenu extends Component {

    @property(Node)
    GameStart: Node = null;

    @property(Node)
    GameEnd: Node = null;

    gameStart() { 
        //异步加载场景，使用预加载场景，确保资源就绪
        director.preloadScene("Game", ()=>{
            director.loadScene("Game");
        });
    }
    gameEnd() {
        game.end();
    }
    start() {

    }

    update(deltaTime: number) {

    }
}


